<template>
  <div>
    {{list}}
  </div>
</template>

<script>
export default {
  name: 'Detail',

  data() {
    return {
      list:[]
    };
  },
  props:['pid'],
  created() {
    this.fn_setDate()
  },

  methods: {
    fn_setDate(){
      // console.log(this.$store.state.list[0].dataA[0].fen[0].id);
      // this.list = this.$store.state.list.find(item => {
      //   return item.dataA.fen.id == this.pid
      // })
      this.$store.state.list.forEach(item => {
        item.dataA.forEach(item => {
          item.fen.forEach(item => {
            if(item.id == this.pid){
              this.list = item
            }
          })
        })
      })
    }
  },
};
</script>

<style scoped>

</style>